<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <jsp:include page="/static/common/common.jsp"></jsp:include>
    <script type="text/javascript" src="/static/js/insurance/insurance.js"></script>
</head>
<body style="color: #f0efee">
<form id="form" method="post">
    <!--拿到的保险产品的id-->
    <input type="hidden" name="id">
    <input type="hidden" id="car_id" name="car.id">
    <input type="hidden" name="customer.id"/>
    <table>
        <tr style="height: 40px;">
            <td>姓名</td>
            <td><input class="easyui-validatebox textbox" name="customer.name" style="width:150px;height: 30px;"
                       data-options="required:true,validType:'length[2,10]'"></td>
            <td>性别</td>
            <td>
                <select id="customer_gender" name="customer.gender" class="easyui-combobox"
                        data-options="panelHeight:'auto',width:'150px'">
                    <option value="1">男</option>
                    <option value="0">女</option>
                </select>
            </td>
            <td>身份证</td>
            <td>
                <input name="customer.idcard" class="easyui-validatebox textbox"
                       style="width:150px;height: 30px;"
                       data-options="required:true,validType:'idcard'"/>
            </td>
        </tr>
        <tr style="height: 40px;">
            <td>联系方式</td>
            <td>
                <input class="easyui-validatebox textbox" style="width:150px;height: 30px;" name="customer.tel"
                       data-options="required:true,validType:'mobile'"/>
            </td>
        </tr>
        <tr style="height: 40px;">
            <td>通讯地址</td>
            <td>
                <input id="address" name="customer.address"
                       class="easyui-textbox" style="width:150px;height: 30px;"/>
            </td>
        </tr>

        <tr>
            <th>
                <a id="choose_customer" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                   data-cmd="choose_customer">会员客户</a>
            </th>
        </tr>
    </table>
    <table>
        <tr style="height: 100px;">
            <td>车主姓名:</td>
            <td>
                <input class="easyui-textbox" style="width:150px;height: 30px;" name="car.name"
                       id="carname" data-options="required:true"/>
            </td>
            <td>品牌</td>
            <td>
                <input id="carbrand" class="easyui-textbox" style="width:150px;height: 30px;" name="car.brand"/>
            </td>
            <td>型号</td>
            <td>
                <input id="carversion" name="car.version" style="width:150px;height: 30px;" class="easyui-textbox"/>
            </td>
        </tr>
        <tr style="height: 40px;">
            <td>车牌号码</td>
            <td>
                <input id="carnumber" name="car.carnumber" class="easyui-textbox"
                       data-options="required:true" style="width:150px;height: 30px;"/>
            </td>
            <td>排气量</td>
            <td>
                <input id="gasnumber" name="car.gasnumber" style="width:150px;height: 30px;"
                       class="easyui-textbox"/>L
            </td>
            <td>汽车分类</td>
            <td>
                <select class="easyui-combobox" name="car.type" id="type" style="width:150px;height: 30px;"
                        data-options="panelHeight:'auto'">
                    <option value="载客">载客</option>
                    <option value="载物">载物</option>
                </select>
            </td>
        </tr>
        <tr style="height: 40px;">
            <td>购置日期</td>
            <td>
                <input name="car.begindate" id="begindate" style="width:150px;height: 30px;"
                       class="easyui-datebox"/>
            </td>
            <td>市场估价</td>
            <td>
                <input name="car.price" id="price" class="easyui-textbox" style="width:150px;height: 30px;"/>万
            </td>
            <td>车载大小</td>
            <td>
                <select class="easyui-combobox" id="carsize" name="car.size" style="width:150px;height: 30px;"
                        data-options="panelHeight:'auto'">
                    <option value="小型">小型</option>
                    <option value="中型">中型</option>
                    <option value="大型">大型</option>
                    <option value="超大型">超大型</option>
                </select>
            </td>
        </tr>

        <tr style="height: 100px;">
            <td>
                <a class="easyui-linkbutton" style="width:150px;"
                   data-options="iconCls:'icon-search'" data-cmd="choose_car">常见车型选择</a>
            </td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
    </table>
    <table>
        <tr>
            <td>承保机构</td>
            <td width="300">
                <input id="organization_select" name="organization.name" style="width:200px;"
                       onchange="changeSafe();"/>
            </td>
            <td>
                <a class="easyui-linkbutton" data-options="iconCls:'icon-xinzeng'" data-cmd="add_product">添加产品</a>
            </td>
            <td>保险时长</td>
            <td>
                <input name="burningTime" style="width: 40px;" id="burningTime" class="easyui-validatebox textbox"
                       data-options="required:true" onchange="calculate();"/>年
            </td>
        </tr>
        </td>
        </tr>
        <tr id="hidethis" class="product-tr" data-oid="-1">
            <td>保险产品:</td>
            <td id="productName" style="width:150px;height: 30px;">防碰瓷险</td>
            <td>产品编号:</td>
            <td id="productSn" style="width:150px;height: 30px;"></td>
            <td>保险年费:</td>
            <td id="cost" class="cost" width="100">0</td>
            <td><a class="easyui-linkbutton"
                   data-options="iconCls:'icon-remove',plain:'true'" onclick="delete_this(this);">删除</a></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td valign="bottom"><font>总计: </font></td>
            <td valign="bottom"><font color="red" size="10" id="totalAmount">0</font></td>
            <td valign="bottom"><font>元</font></td>
        </tr>
    </table>
    <table>
        <tr>
            <td>申请建议：</td>
        </tr>
        <tr>
            <td>
                <input id="applicationAdvice" name="applicationAdvice" multiline="true"
                       style="width:400px;height: 80px;"
                       class="easyui-textbox"/>
            </td>
        </tr>
        <tr>
            <td>审核意见：</td>
        </tr>
        <tr>
            <td>
                <input id="remark" name="remark" multiline="true" style="width:400px;height: 80px;"
                       class="easyui-textbox"/>
            </td>
        </tr>
    </table>
    <input type="button" style="margin-left: 10px;width:110px;height: 40px;" onclick="tempStor_submit();"
           class="easyui-linkbutton" value="暂存保单">
    <input type="button" style="margin-left: 10px;width:110px;height: 40px;" onclick="preAudit_submit();"
           class="easyui-linkbutton" value="提交审批">
    <div id="choose_product_dialog">
        <table id="product_datagrid"></table>
    </div>
    <div id="choose_customer_dialog">
        <table id="customer_datagrid"></table>
    </div>
    <div id="choose_car_dialog">
        <table id="car_datagrid"></table>
    </div>

    <div id="product_btns2">
        <a class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="select_product"> 确定</a>
    </div>
    <div id="customer_btns2">
        <a class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="select_customer">确定</a>
    </div>
    <div id="car_btns2">
        <a class="easyui-linkbutton" iconCls="icon-ok" plain="true" data-cmd="select_car"> 确定</a>
    </div>
</form>
</body>
</html>